@extends('home.layout.index')
@section('link')
<link rel="stylesheet" href="/homeassets/homepage/meizu/css/layout-25702f0ee1.css" />
<link href="/homeassets/homepage/meizu/css/index-72d78d396d.css" rel="stylesheet"/>
<style>
.flexslider {
	margin: 0px auto 20px;
	position: relative;
	width: 100%;
	height: 482px;
	overflow: hidden;
	zoom: 1;
}

.flexslider .slides li {
	width: 100%;
	height: 100%;
	padding: 0px;
	margin: 0px;
	list-style-type: none;
}

.flex-direction-nav a {
	width: 70px;
	height: 70px;
	line-height: 99em;
	overflow: hidden;
	margin: -35px 0 0;
	display: block;
	background: url(/homeassets/homepage/images/ad_ctr.png) no-repeat;
	position: absolute;
	top: 50%;
	z-index: 10;
	cursor: pointer;
	opacity: 0;
	filter: alpha(opacity=0);
	-webkit-transition: all .3s ease;
	border-radius: 35px;
}

.flex-direction-nav .flex-next {
	background-position: 0 -70px;
	right: 0;
}

.flex-direction-nav .flex-prev {
	left: 0;
}

.flexslider:hover .flex-next {
	opacity: 0.8;
	filter: alpha(opacity=25);
}

.flexslider:hover .flex-prev {
	opacity: 0.8;
	filter: alpha(opacity=25);
}

.flexslider:hover .flex-next:hover,
.flexslider:hover .flex-prev:hover {
	opacity: 1;
	filter: alpha(opacity=50);
}

.flex-control-nav {
	width: 100%;
	position: absolute;
	bottom: 10px;
	text-align: center;
}

.flex-control-nav li {
	margin: 0 2px;
	display: inline-block;
	zoom: 1;
	*display: inline;
}

.flex-control-paging li a {
	background: url(/homeassets/homepage/images/dot.png) no-repeat 0 -16px;
	display: block;
	height: 16px;
	overflow: hidden;
	text-indent: -99em;
	width: 16px;
	cursor: pointer;
}

.flex-control-paging li a.flex-active,
.flex-control-paging li.active a {
	background-position: 0 0;
}

.flexslider .slides a img {
	width: 100%;
	height: 482px;
	display: block;
	
}
</style>
@endsection
@section('content')

<!-- 轮播广告 -->
<div id="banner_tabs" class="flexslider">
	<ul class="slides">
		@foreach($poster as $value)
		<li>
			<a title="" target="_blank" href="{{ $value['url'] }}">
				<img card="haxi" width="1920" height="486px" alt="" style="background: url({{ $value['image'] or '/homeassets/homepage/images/banner1.jpg'}}) no-repeat center;" src="/homeassets/homepage/images/alpha.png">
			</a>
		</li>
		@endforeach
	</ul>
	<ul class="flex-direction-nav">
		<li><a class="flex-prev" href="javascript:;">Previous</a></li>
		<li><a class="flex-next" href="javascript:;">Next</a></li>
	</ul>
	<ol id="bannerCtrl" class="flex-control-nav flex-control-paging">
		<li class="active"><a>1</a></li>
		@for($i = count($poster)-1;$i > 0;$i--)
		<li><a>2</a></li>
		@endfor
	</ol>
</div>
<script src="/homeassets/homepage/js/jquery-1.10.2.min.js"></script>
<script src="/homeassets/homepage/js/slider.js"></script>
<script type="text/javascript">
$(function() {
	var bannerSlider = new Slider($('#banner_tabs'), {
		time: 5000,
		delay: 400,
		event: 'hover',
		auto: true,
		mode: 'fade',
		controller: $('#bannerCtrl'),
		activeControllerCls: 'active'
	});
	$('#banner_tabs .flex-prev').click(function() {
		bannerSlider.prev()
	});
	$('#banner_tabs .flex-next').click(function() {
		bannerSlider.next()
	});
})
</script>
<!-- =======================左上菜单栏====================== -->
<ul class="home-category" id="homeCategory" style="margin-top:200px;height:485px;padding:0px;">
        <li class="home-category-item" style="margin:0">
            <a href="/allgoods" class="home-category-link" data-mtype="store_index_cdh_1" data-mdesc="侧边导航中第1个分类">
                全部商品分类
            </a>
        
</li>
@foreach($enum as $k => $v)

 <li class="home-category-item " style="margin:0">
            <a href="/allgoods?more={{ $v['id'] }}" class="home-category-link" data-mtype="store_index_cdh_2" data-mdesc="侧边导航中第2个分类">
                {{ $v['classname'] }}
            </a>
        
<div class="home-category-child clearfix" style="display:none;overflow: hidden;">
  
  @foreach($v['sub'] as $vv)
    @if($v['id'] == $vv['pid'])
  <ul class="home-category-child-list">
    
    
    <li class="home-category-child-item">
      <a class="home-category-child-link" href="/allgoods?twomore={{ $vv['id'] }}&fn=2&ff={{ $vv['id'] }}" data-mdesc="侧边导航中第2个分类第1个产品">
        <div class="home-category-child-text">{{ $vv['classname'] }}</div>
      </a>
    </li> 
    @foreach($enumgoods as $vvv)
    @if($vvv['class2'] == $vv['id'])
    <li class="home-category-child-item">
      <a class="home-category-child-link" href="/goodsdetail/{{ $vvv['id'] }}" data-mdesc="侧边导航中第2个分类第1个产品">

        <div class="home-category-child-text">
			<img class="home-category-child-img" src="{{ $vvv['picture'] }}">
        	{{ $vvv['goodsname'] }}
        </div>
      </a>
    </li>
    @endif
    @endforeach
  </ul>

  @endif
  @endforeach
</div>

</li>
 @endforeach     
</ul>
<!-- 热卖商品 -->
<div class="home-hot mzcontainer" >
    <div class="home-hot-header clearfix">
        <div class="home-hot-title">热品推荐</div>
        <div class="home-hot-ctrl clearfix" >
            <div class="home-hot-ctrl-btn disabled" id="homeHotCtrlPrev" data-mtype="store_main_rp_a" data-mdesc="">
                <i class="home-font prev1"></i>
            </div>
            <div class="home-hot-ctrl-btn" id="homeHotCtrlNext" data-mtype="store_main_rp_b" data-mdesc="">
                <i class="home-font next1"></i>
            </div>
        </div>
    </div>
    <div class="home-hot-content lazyload" id="homeHotContent" style="padding;0:margin:0">

	    <ul class="home-hot-list" style="left: 0px;margin:0;padding:0">
	    @foreach($hotsale as $value)
		  <li class="home-product" card="hotsale">
		    <a class="home-product-link" href="/goodsdetail/{{ $value['id'] }}" target="_blank" data-mtype="store_index_rp_1_1" data-mdesc="热品推荐第1屏第1个坑">
		      <img class="home-product-img" src="{{ $value['picture'] }}" alt="魅族 MX6">

		      
		      <h4 class="home-product-title">{{ $value['goodsname'] }}</h4>
		    
		      <p class="home-product-bottom">
		        
		        <span class="home-product-price">{{ $value['price'] }}
		              <span class="home-product-start-tag">起</span> 
		        </span>
		        
		      </p>
		      
		      <div class="home-product-sign" style="background-color: #f59646;">热卖</div>		      
		    </a>
		    
		  </li>
		  @endforeach
		</ul>
	</div>
</div>

<!-- 商品展示位 -->
@foreach($enum1 as $key => $value)
<ul class="home-floor" id="homeFloor" style="margin:0;padding:0">
    <li class="home-floor-item mzcontainer">
        <div class="home-floor-ad">
           <!-- 广告1 -->
           @foreach($adver as $keya => $vadver)
           @if($keya == $key)
			<div class="home-floor-ad-content">
				<div class="mzcontainer">
					<a href="{{ $vadver['adverurl'] }}" class="home-floor-ad-point" title="MX6" style="width: 1240px; height: 120px; left: 0px; top: 0px;" target="_blank" data-mtype="store_index_yl_1_1" data-mdesc="第1个腰栏的第1个热区">
			  			<img src="{{ $vadver['adverphoto'] }}" width="100%" height="120px" onerror="this.src='/homeassets/homepage/meizu/images/lazyload-8b704ceeec.gif'" class="home-floor-ad-img">	
			  		</a>
				</div>
			</div>
			@endif
			@endforeach
        </div>
        <div class="home-floor-content">
        	<div class="home-floor-header clearfix">
		  <h2 class="home-floor-title">{{ $value['classname'] }}</h2>
		  
		  
		  <a class="home-floor-more" href="/allgoods?more={{ $value['id'] }}" target="_blank" data-mtype="store_index_kwd_1_g" data-mdesc="链接跳到 一层分类下的所有商品">更多&gt;</a>
		  
		</div>
<ul class="home-floor-product clearfix" style="margin:0;padding:0">
@foreach($goods as $vgoods)
@foreach($vgoods as $vvgoods)
  
  @if($value['id'] == $vvgoods['class1'])
  <li class="home-product">
    <a class="home-product-link" href="/goodsdetail/{{ $vvgoods['id'] }}" target="_blank" data-mtype="store_index_kw_1_2" data-mdesc="链接调到商品详情">
      <img class="home-product-img" src="{{ $vvgoods['picture'] }}" alt="">

      
      <h4 class="home-product-title">{{ $vvgoods['goodsname'] }}</h4>
     
      <p class="home-product-bottom">
        
        <span class="home-product-price">{{ $vvgoods['price'] }}
              
            </span>
        
      </p>
      
      <div class="home-product-sign" style="background-color: #00afbe;">现货</div>
      

      
    </a>
    
  </li>
  @endif
@endforeach
@endforeach
</ul>
</div>
</li>
</ul>
@endforeach 
@endsection
@section('js')
<script src="/homeassets/homepage/banner.js"></script>
@endsection